Python: fix alerts for py/import-deprecated-module#2711
Merged
tausbn merged 5 commits intogithub:masterfrom Feb 17, 2020
Merged
Python: fix alerts for py/import-deprecated-module#2711tausbn merged 5 commits intogithub:masterfrom
tausbn merged 5 commits intogithub:masterfrom
Conversation
This changes the location from the import statement, to the actual expression
$ python2 -W default -c 'import posixfile' -c:1: DeprecationWarning: The posixfile module is deprecated; fcntl.lockf() provides better locking https://docs.python.org/2.7/library/posixfile.html
Member
Author
gives the result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old query had
and before merging this, I would like to understand if there are any meaningful results that this would catch, compared to
Clearly, the old code had some nasty side-effects since it would alert on multiple levels, as in https://lgtm.com/projects/g/h2oai/h2o-3/snapshot/c78f48eea306360d9044197c83a24bacb813b839/files/py2/h2o_objects.py?sort=name&dir=ASC&mode=heatmap#x3ea6a547ca4855b1:1 but I'm wondering if there is any desirable results that are not found by the second variation.